Skip to content

fix: Clarify Failed Code Artifact Registration#190

Merged
danny-avila merged 1 commit into
mainfrom
danny-avila/code-error-persistence-guidance
May 21, 2026
Merged

fix: Clarify Failed Code Artifact Registration#190
danny-avila merged 1 commit into
mainfrom
danny-avila/code-error-persistence-guidance

Conversation

@danny-avila
Copy link
Copy Markdown
Owner

@danny-avila danny-avila commented May 21, 2026

Summary

I clarified code-execution artifact guidance so failed executions are not confused with broken /mnt/data persistence, and tightened bash PTC output handling based on live testing.

  • Added a shared failed-execution reminder when code references /mnt/data, so direct code, bash, and PTC errors tell the model that files from the failed call were not registered.
  • Updated artifact path guidance to say failed executions do not register new files while preserving the /tmp scratch guidance.
  • Tightened bash PTC jq guidance for JSON-string fields and arrays that may contain strings.
  • Updated bash PTC examples to capture tool output with command substitution and printf before saving files, avoiding direct tool-call redirection that can create empty files.
  • Added coverage for bash PTC error output and description guidance.

Change Type

  • Bug fix (non-breaking change which fixes an issue)
  • Documentation update

Testing

  • npx jest src/tools/__tests__/ProgrammaticToolCalling.test.ts src/tools/__tests__/BashExecutor.test.ts src/tools/__tests__/CodeApiAuthHeaders.test.ts --runInBand
  • npx eslint src/tools/CodeExecutor.ts src/tools/BashExecutor.ts src/tools/ProgrammaticToolCalling.ts src/tools/BashProgrammaticToolCalling.ts src/tools/__tests__/ProgrammaticToolCalling.test.ts src/tools/__tests__/BashExecutor.test.ts src/tools/__tests__/CodeApiAuthHeaders.test.ts
  • npx tsc --noEmit
  • Live direct CodeAPI smoke against http://localhost:3112/v1/exec/programmatic verified failed /mnt/data writes include the registration reminder.
  • Live Claude Sonnet 4.6 agent run verified bash PTC used command substitution for tool output, handled double-encoded JSON with jq, and did not treat failed-call files as persistent.

Test Configuration:

  • Local agents worktree on danny-avila/code-error-persistence-guidance
  • Existing repository dependencies via node_modules
  • Local CodeAPI at http://localhost:3112/v1
  • Provider credentials loaded from the main worktree .env

Checklist

  • My code adheres to this project's style guidelines
  • I have performed a self-review of my own code
  • I have made pertinent documentation changes
  • My changes do not introduce new warnings
  • I have written tests demonstrating that my changes are effective or that my feature works
  • Local unit tests pass with my changes

@danny-avila
Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector
Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Nice work!

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@danny-avila danny-avila force-pushed the danny-avila/code-error-persistence-guidance branch from 332a465 to b70eb66 Compare May 21, 2026 21:28
@danny-avila
Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector
Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Another round soon, please!

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@danny-avila danny-avila changed the title 🧭 fix: Clarify Failed Code Artifact Registration fix: Clarify Failed Code Artifact Registration May 21, 2026
@danny-avila danny-avila merged commit 1490cb8 into main May 21, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant